package com.lagou.rpc.provider.controller;

import com.lagou.rpc.pojo.User;
import com.lagou.rpc.provider.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    UserServiceImpl userService;

    @RequestMapping("getUser/{id}")
    public User getUserById(@PathVariable("id") Integer id) {
        return userService.getById(id);
    }

}
